package com.mbl.base.modular.note.controller;


import com.mbl.base.core.common.controller.BaseController;
import com.mbl.base.modular.note.entity.Note;
import com.mbl.base.modular.note.service.INoteService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 人文旅游、民宿表 前端控制器
 * </p>
 *
 * @author lwj
 * @since 2020-02-28
 */
@RestController
@RequestMapping("/note/note")
public class NoteController extends BaseController<Note, INoteService> {




    @Override
    public void machiningView(Note obj) {
        /**
         * 增加浏览次数
         */
        obj.setPreviewCount(obj.getPreviewCount() + 1);
        getService().save(obj);
    }
}

